(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/user/movieorder" ], {
    "03b4": function(e, t, n) {
        var r = n("8ab2");
        n.n(r).a;
    },
    "4df1": function(e, r, o) {
        (function(a) {
            Object.defineProperty(r, "__esModule", {
                value: !0
            }), r.default = void 0;
            var e, i = (e = o("a34a")) && e.__esModule ? e : {
                default: e
            };
            function u(e, t, n, r, o, a, i) {
                try {
                    var s = e[a](i), u = s.value;
                } catch (e) {
                    return n(e), 0;
                }
                s.done ? t(u) : Promise.resolve(u).then(r, o);
            }
            function n(s) {
                return function() {
                    var e = this, i = arguments;
                    return new Promise(function(t, n) {
                        var r = s.apply(e, i);
                        function o(e) {
                            u(r, t, n, o, a, "next", e);
                        }
                        function a(e) {
                            u(r, t, n, o, a, "throw", e);
                        }
                        o(void 0);
                    });
                };
            }
            var s = getApp(), t = (o("10cd"), {
                data: function() {
                    return {
                        module_name: s.globalData.module_name,
                        showAlert_login: !1,
                        userinfo: a.getStorageSync("userinfo"),
                        setting: a.getStorageSync("setting"),
                        wxCode: "",
                        systemtype: "",
                        swiperCurrentIndex: 0,
                        tabs: [ "全部订单", "已出票", "已取消" ],
                        mainHeight: 0,
                        orders: [ [], [], [] ],
                        pages: [ 1, 1, 1 ],
                        loadingTypes: [ 3, 3, 3 ],
                        pageLoading: !0,
                        type: "",
                        pageKey: "",
                        height: 1334,
                        tabBar: [],
                        sharetitle: "",
                        sharepic: ""
                    };
                },
                onShow: function() {
                    var t = this;
                    return n(i.default.mark(function e() {
                        return i.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, t.$onLaunched;

                              case 2:
                                a.hideLoading();

                              case 3:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onReady: function() {
                    var n = this;
                    setTimeout(function() {
                        a.createSelectorQuery().select("#gBody").fields({
                            size: !0
                        }, function(t) {
                            a.createSelectorQuery().select("#nav").fields({
                                size: !0
                            }, function(e) {
                                n.mainHeight = t.height - e.height, n.pageLoading = !1;
                            }).exec();
                        }).exec();
                    }, 1500);
                },
                onShareAppMessage: function() {
                    var e = "pages/user/movieorder?uid=" + a.getStorageSync("userinfo").user_id;
                    return {
                        title: this.sharetitle,
                        imageUrl: this.sharepic,
                        path: e
                    };
                },
                onLoad: function(r) {
                    var o = this;
                    return n(i.default.mark(function e() {
                        var t, n;
                        return i.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, o.$onLaunched;

                              case 2:
                                (t = o).setting = a.getStorageSync("setting"), t.userinfo = a.getStorageSync("userinfo"), 
                                a.hideLoading(), o.module_name = s.globalData.module_name, n = r, o.type = r.op, 
                                "done" == n.type && (o.swiperCurrentIndex = 1), t.getOrders();

                              case 12:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                watch: {
                    swiperCurrentIndex: function(e) {
                        this.orders[this.swiperCurrentIndex].length < 1 && 3 == this.loadingTypes[this.swiperCurrentIndex] && this.getOrders();
                    }
                },
                methods: {
                    fatherHeight: function(e) {
                        this.height = e;
                    },
                    showDialog2: function() {
                        this.$refs.showAlert_login.open();
                    },
                    closeDialog2: function() {
                        this.$refs.showAlert_login.hide();
                    },
                    login: function(t) {
                        var n = this;
                        this.closeDialog2(), a.getSetting({
                            success: function(e) {
                                e.authSetting["scope.userInfo"] ? a.getUserInfo({
                                    success: function(e) {
                                        n.userAuth(t, e.userInfo, "login");
                                    }
                                }) : n.userAuth(t, null, "login");
                            }
                        });
                    },
                    getWxCode: function() {
                        var t = this;
                        wx.login({
                            success: function(e) {
                                t.wxCode = e.code;
                            }
                        });
                    },
                    userAuth: function(n, e, r) {
                        var o = this;
                        "getUserInfo:ok" == n.detail.errMsg ? wx.login({
                            success: function(e) {
                                var t = s.globalData.util.url("entry/wxapp/api", {
                                    m: s.globalData.module_name,
                                    o: "userinfo"
                                }), e = {
                                    code: e.code,
                                    encryptedData: n.detail.encryptedData,
                                    iv: n.detail.iv,
                                    openid: a.getStorageSync("openid"),
                                    invite_uid: wx.getStorageSync("invite_uid")
                                };
                                a.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        1 == e.data.status ? (e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                        e = JSON.parse(e), a.setStorageSync("userinfo", e.userinfo), o.userinfo = e.userinfo, 
                                        "login" == r && (o.closeDialog2(), a.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        })), o.load_myqrcode2()) : a.showToast({
                                            title: "您取消了请求",
                                            icon: "none"
                                        });
                                    }
                                });
                            }
                        }) : a.showToast({
                            title: "获取用户信息失败",
                            icon: "none"
                        });
                    },
                    closeAlert: function() {
                        this.closeDialog2();
                    },
                    openmovieorder: function(e) {
                        a.getStorageSync("userinfo").nickname || 1 != a.getStorageSync("setting").login_type ? a.navigateTo({
                            url: "../../pagesA/pages/userA/movieorderdetail?id=" + e.currentTarget.dataset.movieorderid
                        }) : this.showDialog2();
                    },
                    navChange: function(e) {
                        this.swiperCurrentIndex = e;
                    },
                    swiperChange: function(e) {
                        e = e.detail.current;
                        this.swiperCurrentIndex = e;
                    },
                    scrollend: function(e) {
                        console.log(e), 3 == this.loadingTypes[this.swiperCurrentIndex] && this.getOrders();
                    },
                    getOrders: function() {
                        var t = this, n = this;
                        this.loadingTypes.splice(this.swiperCurrentIndex, 1, 1);
                        var e = s.globalData.util.url("entry/wxapp/movieorders2", {
                            m: s.globalData.module_name
                        }), r = {
                            openid: a.getStorageSync("openid"),
                            type: this.type,
                            status: this.tabs[this.swiperCurrentIndex],
                            page: this.pages[this.swiperCurrentIndex]
                        };
                        a.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: r,
                            success: function(e) {
                                n.sharetitle = e.data.sharetitle, n.sharepic = e.data.sharepic;
                                e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                "ok" == e.status || "nomore" == e.status ? (1 == t.pages[t.swiperCurrentIndex] ? t.orders.splice(t.swiperCurrentIndex, 1, e.orders) : t.orders[t.swiperCurrentIndex] = t.orders[t.swiperCurrentIndex].concat(e.orders), 
                                t.pages[t.swiperCurrentIndex]++, "nomore" == e.status ? t.loadingTypes.splice(t.swiperCurrentIndex, 1, 2) : t.loadingTypes.splice(t.swiperCurrentIndex, 1, 3)) : "empty" == e.status ? (console.log("empty"), 
                                t.loadingTypes.splice(t.swiperCurrentIndex, 1, 5)) : "nomore" == e.status && (console.log("nomore"), 
                                t.loadingTypes.splice(t.swiperCurrentIndex, 1, 2));
                            }
                        });
                    }
                },
                components: {
                    gracePage: function() {
                        o.e("graceUI/components/gracePage").then(function() {
                            return resolve(o("1021"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceNavBar: function() {
                        o.e("graceUI/components/graceNavBar").then(function() {
                            return resolve(o("a631"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceEmpty: function() {
                        o.e("graceUI/components/graceEmptyNew").then(function() {
                            return resolve(o("f8df"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceLoading: function() {
                        o.e("graceUI/components/graceLoading").then(function() {
                            return resolve(o("1d04"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceDialog: function() {
                        o.e("graceUI/components/graceDialog").then(function() {
                            return resolve(o("f85d"));
                        }.bind(null, o)).catch(o.oe);
                    }
                }
            });
            r.default = t;
        }).call(this, o("543d").default);
    },
    "8ab2": function(e, t, n) {},
    d5aa: function(e, t, n) {
        n.r(t);
        var r, o = n("4df1"), a = n.n(o);
        for (r in o) "default" !== r && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(r);
        t.default = a.a;
    },
    d700: function(e, t, n) {
        n.r(t);
        var r, o = n("f1fb"), a = n("d5aa");
        for (r in a) "default" !== r && function(e) {
            n.d(t, e, function() {
                return a[e];
            });
        }(r);
        n("03b4");
        var i = n("f0c5"), o = Object(i.a)(a.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        t.default = o.exports;
    },
    e314: function(e, t, n) {
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            n("0cda"), t(n("66fd")), e(t(n("d700")).default);
        }).call(this, n("543d").createPage);
    },
    f1fb: function(e, t, n) {
        n.d(t, "b", function() {
            return r;
        }), n.d(t, "c", function() {
            return o;
        }), n.d(t, "a", function() {});
        var r = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    }
}, [ [ "e314", "common/runtime", "common/vendor" ] ] ]);